#include <iostream>
#include <memory>
using namespace std;

class Dog
{
public:
	Dog(){};
	~Dog(){};

	void bark()
	{
		cout << "dog bark !! \n";
	}
};

int main()
{
	auto_ptr <int> pSmartPtr (new int);
	*pSmartPtr = 25;
	cout << "*pSmartPtr = " << *pSmartPtr << endl;

	auto_ptr <Dog> pSmartDog (new Dog);
	pSmartDog -> bark();
	return 0;
}